package com.tedu;

//    &与 and   &&双与       |或 or     ||双或 短路或
public class Test006 {
    public static void main (String[] args) {
        int a = 10;
        int b = 20;

        boolean c = a > b & a == b; //false false
        System.out.println(c); //false

        c = a < b & a != b; //true true
        System.out.println(c); //true

        c = a < b & a == b; //true false
        System.out.println(c); //false

        c = a > b & a != b; //false true
        System.out.println(c); //false
        //&   见假为假  同真则真
        System.out.println("=====================");

        c = a > b | a == b; //false false
        System.out.println(c); //false

        c = a < b | a != b; //true true
        System.out.println(c); //true

        c = a < b | a == b; //true false
        System.out.println(c); //true

        c = a > b | a != b; //false true
        System.out.println(c); //true

        //   |   见真为真  同假则假

        System.out.println(a);
        System.out.println(b);

//        c = a < b || a++ > b;  // true  false
//        System.out.println(c);
//        System.out.println(a);
//        System.out.println(a);
//        System.out.println(a);

        c = a > b && a++ > b;  // true  false
        System.out.println(c);
        System.out.println(a);
        System.out.println(a);
        System.out.println(a);

    }
}
